package com.hdax.dmw.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hdax.dmw.entity.base.Image;
import com.hdax.dmw.base.service.ImageService;
import com.hdax.dmw.base.mappers.ImageMapper;
import org.springframework.stereotype.Service;

/**
* @author guoyisha
* @description 针对表【dm_image(图片表)】的数据库操作Service实现
* @createDate 2023-06-20 11:34:01
*/
@Service
public class ImageServiceImpl extends ServiceImpl<ImageMapper, Image>
    implements ImageService{

    @Override
    public Image image(Long targetId, Integer type, Integer category) {
        QueryWrapper<Image> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("targetId",targetId)
                .eq("type",type)
                .eq("category",category);
        return getOne(queryWrapper);
    }
}




